package com.yqkj.zysoft.upms.entity.dto;

import  com.project.easy.common.util.constants.CommonIntConstant;
import  com.project.easy.common.util.dto.ApiContextParam;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author GreatorMan.cool
 * @copyright: Copyright (c) 2020
 * @company: 扬起科技有限公司
 * @date 2021/9/8 21:27
 * @description: 部门管理
 */
@Data
public class FrameWorkDepartAddRequest extends ApiContextParam {
    /**
     * 部门名称
     */
    @NotBlank(message = "部门名称不能为空")
    @Length(message = "部门名称不能超过{max}字符长度", max = 64)
    private String name;

    /**
     * 联系人电话
     */
    @Pattern(regexp = "^1\\d{10}$", message = "联系人电话非法")
    private String phone;

    /**
     * 邮件
     */
    @Length(message = "邮件不能超过{max}字符长度", max = 32)
    private String email;
    /**
     * 负责人名称
     */
    @Length(message = "负责人名称不能超过{max}字符长度", max = 32)
    private String leadName;

    /**
     * 上级Code
     */
    private String parentCode;

    /**
     * 排序
     */
    private Integer sort = CommonIntConstant.DEFAULT_SORT;

}
